import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:online_study/home/message/message_details.dart';
import 'package:online_study/home/message/message_list.dart';
import 'package:online_study/theme/colors.dart';
import 'package:online_study/theme/size.dart';

//首页消息
class HomeMessage extends StatefulWidget {
  @override
  _HomeMessageState createState() => _HomeMessageState();
}

class _HomeMessageState extends State<HomeMessage> {
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.symmetric(horizontal: ThemeSize.width9),
      color: ThemeColor.colorWhite,
      height: ThemeSize.height44,
      child: Row(
        children: [
          Container(
            padding: EdgeInsets.only(right: ThemeSize.width5),
            child: Icon(Icons.circle,
                color: ThemeColor.colorRed, size: ThemeSize.height8),
          ),
          Expanded(
              child: GestureDetector(
            child: Text("通知：企业文化全员考试，本次考试暂定于2021",
                style: TextStyle(
                    color: ThemeColor.color333333, fontSize: ThemeSize.sp13)),
            onTap: () {
              Get.to(() => MessageDetailsPage());
            },
          )),
          GestureDetector(
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Text("更多",
                    style: TextStyle(
                        color: ThemeColor.color808080,
                        fontSize: ThemeSize.sp13)),
                Container(
                    margin: EdgeInsets.only(right: ThemeSize.width9),
                    child: Icon(const IconData(0xe631, fontFamily: 'IconFonts'),
                        size: ThemeSize.height12))
              ],
            ),
            onTap: () {
              Get.to(() => MessageListPage());
            },
          )
        ],
      ),
    );
  }
}
